/*
   https://leetcode.cn/problems/count-number-of-ways-to-place-houses/submissions/568885496/
  统计放置房子的方式数
24/9/6
*/


class Solution {
public:

    int countHousePlacements(int n) {
        vector<long long>res(n+1);
        res[0]=1;
        res[1]=2;
        if(n<2) return res[n]*res[n];
        long long yu=1e9+7;
        for(int i=2;i<n+1;i++){
            res[i]=(res[i-1]+res[i-2])%yu;
        }
        int count=(res[n]*res[n])%yu;
        return count;
    }
};